<template>
  <div>
    原数据：
    <el-input v-model="d1" placeholder="请输入内容"></el-input>
    <el-button type="primary" @click="jiami" plain>加密</el-button>
    <el-button type="primary" @click="jiemi" plain>解密</el-button>
    加密数据：
    <el-input v-model="d2" placeholder="请输入内容"></el-input>
  </div>
</template>

<script>

    import utils from "../utils";

    export default {
        name: "test",
        data() {
            return {
                d1: '',
                d2: '',
                selectedFile: Array,
                fileUrl: ''
            }
        },
        created() {
            console.log("开始执行！")
            this.getLocalFile()
        },
        methods: {
            jiami() {
                console.log("加密-----", this.d1);
                let dd = utils.Encrypt(this.d1)
                console.log(dd)
                this.d2 = dd
            },
            jiemi() {
                console.log("解密-----", this.d2);
                this.d1 = utils.Decrypt(this.d2)
            }
        }
    }
</script>

<style scoped>

</style>
